package com.example.springbootdemo.listener;

import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import javax.servlet.annotation.WebListener;

/**
 * @Author: ShengXiaJia
 * @Date: 2019/12/6 15:51
 * @Description: 自定义监听器例子(常用的监听器 servletContextListener 、 httpSessionListener 、 servletRequestListener)
 */
@WebListener
public class MyListener implements ServletRequestListener {

    @Override
    public void requestInitialized(ServletRequestEvent sre) {
        System.out.println("========监听器 requestInitialized========");
    }

    @Override
    public void requestDestroyed(ServletRequestEvent sre) {
        System.out.println("========监听器 requestDestroyed========");
    }

}